package com.situ.service;

import com.situ.dao.Fooddao;
import com.situ.entity.Food;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FoodServiceImpl implements FoodService {
    @Autowired
    Fooddao dao;

    @Override
    public List<Food> queryall() {

        return dao.queryall();
    }

    @Override
    public void save(Food food) {
        dao.save(food);
    }

    @Override
    public void dl(Integer id) {
        dao.delete(id);
    }

    @Override
    public Food querybyid(int id) {
        return dao.querybyid(id);
    }
}
